package com.zdxlz.fcmp.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zdxlz.fcmp.common.mybatis.base.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import static com.zdxlz.fcmp.common.core.constant.ParameterVerifyMsgConstants.*;

/**
 * <p>
 * IPSec配置表
 * </p>
 *
 * @author: aman
 * @since 2025-02-08
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("ipsec_vpn_config")
public class IpsecVpnConfigEntity extends BaseEntity {

    /**
     * vpn名称
     */
    @NotBlank(message = VPN_NAME_VERIFY_MSG)
    @TableField("name")
    private String name;

    /**
     * vpn模板名称
     */
    @TableField("template_name")
    private String templateName;

    /**
     * VPN模板ID
     */
    @NotNull(message = IPSECTEMPLATEID_VERIFY_MSG)
    @TableField("ipsec_template_id")
    private Integer ipsecTemplateId;

    /**
     * 密钥，模板是PreShareKey,这个字段必填
     */
    @TableField("ike_keys")
    private String ikeKeys;

    /**
     * a索引序列号
     */
    @TableField("device_index_a")
    private Integer deviceIndexA;

    /**
     * b索引序列号
     */
    @TableField("device_index_b")
    private Integer deviceIndexB;

    /**
     * 连接是否启用(false：去使能 true：使能)
     */
    @NotNull(message = ENABLE_VERIFY_MSG)
    @TableField("enable")
    private Boolean enable;

    /**
     * 组网设备a
     */
    @NotBlank(message = DEVICEMACA_VERIFY_MSG)
    @TableField("device_mac_a")
    private String deviceMacA;

    /**
     * 组网设备b
     */
    @NotBlank(message = DEVICEMACB_VERIFY_MSG)
    @TableField("device_mac_b")
    private String deviceMacB;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

}
